import {lazy} from "react";
import { RouteRawState } from "../types";
const Home = lazy(() => import("../views/home"));
const Find = lazy(() => import("../views/find"));
const Hot = lazy(() => import("../views/hot"));
const My = lazy(() => import("../views/my"));
const MainLayout = lazy(() => import("../views/mainLayout"));
const Login = lazy(() => import("../views/login"));
const Search = lazy(() => import("../views/search"));
const Sign = lazy(() => import("../views/sign"));
const Tags = lazy(() => import("../views/tags"));
export const routes: RouteRawState[] = [
  {
    path: "/",
    element: <MainLayout></MainLayout>,
    children: [
      {
        path: "/",
        element: <Home></Home>,
      },
      {
        path: "/hot",
        element: <Hot></Hot>,
      },
      {
        path: "/find",
        element: <Find></Find>,
      },
      {
        path: "/my",
        element: <My></My>,
      },
    ],
  },
  {
    path: "/login",
    element: <Login></Login>,
  },
  {
    path: "/search",
    element: <Search></Search>,
  },
  {
    path: "/sign",
    element: <Sign></Sign>,
  },
  {
    path: "/tags",
    element: <Tags></Tags>,
  },
];
